package com.xx.service.impl;

import com.xx.entity.Book;
import com.xx.mapper.BookMapper;
import com.xx.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class BookServiceImpl implements BookService {

    @Autowired
    BookMapper bookMapper;

    @Override
    public List<Book> getList(String bookName, String author) {
        return bookMapper.getList(bookName,author);
    }

    @Override
    public Book getBookInfo(Integer bookId) {
        return bookMapper.getBookInfo(bookId);
    }

    @Override
    public int saveBook(Book book) {
        return bookMapper.saveBook(book);
    }

    @Override
    public int updateBook(Book book) {
        return bookMapper.updateBook(book);
    }

    @Override
    public int delBook(Integer bookId) {
        return bookMapper.delBook(bookId);
    }
}
